<!DOCTYPE html>
<html lang="zh-cn">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>{{title}}</title>

	<script src="js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="js/login_js.js"></script>
	{{!-- <link href="css/login_css.css" type="text/css" rel="stylesheet"> --}}
	<script type="text/javascript" src="js/home_page.js"></script>
	<link rel="stylesheet" href="css/home_page.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="icon" href="/images/favicon.ico" type="image/x-icon">

	{{css "/stylesheets/style.css"}}
	{{#each cssList}}
	<link rel='stylesheet' href="{{this}}" />
	{{/each}}


	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
</head>

<body>
	<!-- 公共头部 -->
	<nav class="navbar navbar-default navbar-static-top" role="navigation">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
					aria-expanded="false" aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="/search">图书管理系统</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				{{#each arr}}
				<ul class="nav navbar-nav">
					<li class="{{sch}}"><a href="/search">书目检索</a></li>
					<!-- <li class=""><a href="/search">借还书</a></li> -->
					<li class="{{lib}}"><a href="/mylib/myborrow">我的图书馆</a></li>
				</ul>
				{{/each}}
				<ul class="nav navbar-nav navbar-right">
					{{#if user }}
					{{#if user.id  }}
					{{!-- <script> console.log("{{ user.id }}")</script> --}}
					<li><a href="/mylib/myborrow">{{user.name}}</a></li>
					<li><a href="/loginOut">退出</a></li>
					{{else }}
					<li><a href="/addbook">添加书籍</a></li>
					<li><a href="/change">删减书本</a></li>
					{{!-- <li><a href="/admin">后台管理</a></li> --}}
					<li><a href="/loginOut">退出</a></li>
					{{/if}}
					{{else}}

					<li class="{{log}}"><a href="/login">登录</a></li>

					<li class="{{log}}"><a href="/logup">注册</a></li>

					{{!--  --}}

					{{!-- <li><a href="/admin">后台管理</a></li> --}}
					{{/if}}
				</ul>
			</div>
		</div>
	</nav>
	<div class='container'>
		{{#if success_msg}}
		<div class="alert alert-success">{{success_msg}}</div>
		{{/if}}
		{{#if error_msg}}
		<div class="alert alert-danger">{{error_msg}}</div>
		{{/if}}
	</div>

	<!-- 内容部分 -->
	{{{body}}}

	<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>

	{{js "/javascripts/search.js"}}
	{{js "/javascripts/mylib.js"}}
	{{#each jsList}}
	<script src={{this}}></script>
	{{/each}}
</body>

</html>